package com.w.tank;

import java.awt.*;

public class Explore extends GameObject{
    static final int WIDTH = ResourceMgr.explores[0].getWidth(), HEIGHT = ResourceMgr.explores[0].getHeight();
    private int step = 0;

    public Explore(int x, int y){
        this.x = x;
        this.y = y;
        GameControl.getInstance().add(this);
    }

    public void paint(Graphics g){
        g.drawImage(ResourceMgr.explores[step++],x,y, WIDTH,HEIGHT,null);
        if(step>=15) GameControl.getInstance().remove(this);


    }

    @Override
    public int getWidth() {
        return WIDTH;
    }

    @Override
    public int getHeight() {
        return HEIGHT;
    }
}
